package com.yigang.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yigang.dao.CollectionDao;
import com.yigang.entity.Collectionshoucang;
import com.yigang.service.CollectionService;
@Service
@Transactional
public class CollectionServiceImpl  implements CollectionService{
@Autowired
	CollectionDao collectionDao;
	@Override
	public List<Map<String, Object>> getAllCollectionById() {
		// TODO Auto-generated method stub
		return collectionDao.getAllCollectionById();
	}
	@Override
	public int addController(Collectionshoucang collections) {
		// TODO Auto-generated method stub
		return collectionDao.insertcollection(collections);
	}
	@Override
	public int deleteByPrimaryKey(Collectionshoucang collections) {
		// TODO Auto-generated method stub
		return collectionDao.deleteByPrimaryKey(Integer.valueOf(collections.getCollection_id()));
	}

}
